//
//  AddressModel.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/12.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "AddressModel.h"

@implementation AddressModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.ID = [dict[@"id"] integerValue];
        self.isDefault = [dict[@"isDefault"] integerValue];
        self.isDel = [dict[@"isDel"] integerValue];
        
        self.receiveAddressCityId = [dict[@"receiveAddressCityId"] integerValue];
        self.receiveAddressCityName = dict[@"receiveAddressCityName"];
        self.receiveAddress = dict[@"receiveAddress"];
//        self.receiveAddressProvinceId = [dict[@"receiveAddressProvinceId"] integerValue];
//        self.receiveAddressProvinceName = dict[@"receiveAddressProvinceName"];
//        self.receiveFullAddress = dict[@"receiveFullAddress"];
        
        self.receivePerson = dict[@"receivePerson"];
        self.receivePersonPhone = dict[@"receivePersonPhone"];
        self.userId = [dict[@"userId"] integerValue];
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[AddressModel alloc]initWithDict:dict];
}

@end
